package com.relax.paozi;

import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;

public class Demo {
    public static void main(String[] args) {
        Lock lock = new ReentrantLock();
        BaoZi baoZi = new BaoZi("包子");

        Seller seller = new Seller(lock, baoZi);
        Eat eat = new Eat(lock, baoZi);

        new Thread(seller).start();
        new Thread(eat).start();
    }
}
